<?php
	get_header();
?>
<div id="single_page_container">

    <div id="single_page_categories">
        <?php get_sidebar('primary')?>
    </div>
    
    <div id="single_page_content">
        <?php if(have_posts()) : while(have_posts()) : the_post(); ?>
            <div class="breadcrumbs">
                <a href="<?php bloginfo('home'); ?>">Home</a> &raquo; <?php the_category(', '); ?> &raquo;
                <?php $parent = $post->post_parent;
                $parent_title = get_the_title($parent);
                echo '<a href="'.get_permalink($parent) .'">' . $parent_title .('');  ?> </a> 
            </div>
            <p class="single_post_content_info">
                <span>
                    Đăng bởi: <?php the_author();?>&nbsp;
                    Danh mục: <?php the_category(', '); ?>&nbsp;
                    Vào lúc: <?php the_time('F j, Y'); ?>&nbsp;
                    Bình luận: <a href="<?php comments_link();?>"><?php comments_number('0','1','%')?></a>
                </span>
            </p>
            <div class="single_post_content_text">
                <div id="single_post_product_info">
                    <?php 
                        $img = get_post_meta($post -> ID, "imagelink1",true);
                        $price = get_post_meta($post -> ID, "price",true);
                        $pricevn = get_post_meta($post -> ID, "pricevn",true);
                    ?>
                    <div id="single_post_product_image"><div id="single_post_product_image_inside" style="background: url('<?php echo $img; ?>') no-repeat; background-size: contain;" ></div></div>
                    <div id="single_post_info_inside" >
                        <h1 id="single_post_info_title"><?php the_title(); ?></h1>
                        <hr />
                        <p style="font-size: 1.2em;"><b>Giá về VN:  <?php echo $pricevn; ?></b></p>
                        <span style="font-size: 0.9em;">Giá tại US:  <b><?php echo $price; ?></b></span>
                    </div>
                    <div class="clear"></div>
                </div>
                <p><?php the_content(''); ?></p>
            </div>
        <?php endwhile; ?>
            <?php else: ?>
                <h1>Sorry, There are no posts to display</h1>
        <?php endif;?>
    </div>
    <div class="clear"></div>
</div>
<?php
	get_footer();
?>